# 实现字符串的md5加密功能
import hashlib
from config import settings


def encrypt_md5(data_string):
    """对字符串进行加盐的md5加密"""
    obj = hashlib.md5(settings.SALT.encode('utf-8'))
    obj.update(data_string.encode('utf-8'))
    res = obj.hexdigest()
    return res
